<style>
.fui-cellone {
    position: relative;
    padding: 0.3rem 0.5rem;
	-webkit-align-items: flex-start;
	align-items:flex-start;
}
.fui-cellone .fui-cellone-label{width:auto;min-width:1.2rem}
.fui-cellone .fui-cellone-text .text{
    background: #fff;
    border-radius: 0.3rem;
	padding:0.3rem 0.4rem;
	font-size:0.7rem;
    color: #333;
    width: auto;
}
.fui-cellone-remark .pic{float: right;width: 2rem;height: 2rem;border-radius: 0.2rem; margin-left:0.7rem;}
.fui-cellone-label .pic{float: left;width: 2rem;height: 2rem;border-radius: 0.2rem;margin-right: 0.7rem;}
.logtime{text-align:center;font-size: 0.65rem;line-height:2;width:7.6rem;margin: 0.6rem auto 0;color: #ccc;border-radius: 0.2rem;}
body,html,.fui-content,.fui-page, .fui-page-group,#mainpage,#sendbox{width: 100%;height: 100%;background: #fff;}
#sendbox {-webkit-box-orient: vertical;-webkit-flex-direction: column;-moz-flex-direction: column;-ms-flex-direction: column;-o-flex-direction: column;flex-direction: column;}
#sendbox .chat-main{-webkit-box-flex: 1;-moz-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;width: 100%;font-size: 0.65rem;overflow-x: hidden;-webkit-overflow-scrolling: touch;background: #fff;display: block;}
#sendbox .chat-main .chatlog(padding: 0.2rem;width:100%)
#sendbox .r .text{float: right;}
#sendbox .l .text{float: left;}
#chat-foot{height: 2.5rem;background: #fff;width: 100%;border-top: #EBEBEB solid 1px;padding: 0.4rem 0.2rem;z-index:11}
#chat-foot span {line-height:1.3rem;font-size:1.4rem;}
#chat-foot .inp{float: left; display: block;color: #333;text-indent: 0.6rem;line-height:1.4rem}
#chat-foot input{border:none;}
#chat-foot .sub-btn{width:2.5rem;text-align:center;float: right;background: #18bc9c;color: #fff;border-radius: 0.2rem;margin:0 0.1rem 0.2rem 0}
#chat-foot .showaudio{width:80%;border: 1px solid #EBEBEB;border-radius: 0.1rem;text-align:center;margin-left:0.2rem;padding:0.1rem 2rem;}
.fui-content {
	position: absolute;
	display: block;
	width: 100%;
	height:100%!important; 
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom:0
}
.chatlog {
	min-height:100%!important; 
	display: box;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-flex-direction: row;
    -moz-flex-direction: row;
    -ms-flex-direction: row;
    -o-flex-direction: row;
    flex-direction: column-reverse;
	overflow-x:Hidden;
	overflow-y:auto;
}
.fui-cell {
	position: relative;
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;
	-moz-transition-duration: 300ms;
	-webkit-transition-duration: 300ms;
	transition-duration: 300ms;
	-webkit-transition-property: background-color;
	transition-property: background-color;
	line-height: 1;
}
.fui-cell .text{font-size:0.8rem;line-height:1.2rem}
.fui-cell .icon{font-size:1.6rem}
.fui-cell-group .fui-cell {line-height:1.7;height:1.6rem}
</style>
<div id="sendbox" class="flex">
	<div class="chat-main flex" id="svposttext" style="padding-bottom:9.5rem;max-height:30rem">
			<div ng-show="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
			<div class="chatlog" style="padding-top:0.5rem">
			<div ng-repeat="item in pagedata.list">
						<div ng-if="item.createtime" class="logtime">{{item.createtime}}</div>
						<div class="fui-cellone">
						<div class="fui-cellone-label"></div>
						<div class="fui-cellone-text">
							<p class="text" style="background:#eee;color:#333;white-space: pre-wrap;">{{item.askmsg}}</p>
						</div>
						</div>
						<div class="fui-cellone" style="padding-bottom:0">
						<div class="fui-cellone-label" style="width:auto;padding-right:0.2rem">
							<img ng-src="{{pagedata.pluginset.ailogo || '../addons/jy_agentmcp/resource/images/ailogo.png'}}" style="height:1rem;"/>
						</div>
						<div class="fui-cellone-text">
							<span class="gray" style="font-size:0.6rem">用时*秒</span>
						</div>
						</div>
						<div class="fui-cellone">
							<p ng-if="!item.answer" class="text">服务器繁忙!请稍后！</p>
							<p ng-if="item.answer" class="text" style="white-space: pre-wrap;" ng-bind-html="trust(item.answer)"></p>
						</div>
						<div class="fui-cellone" style="padding-top:0">
						<div class="fui-cellone-text">
							<i ng-click="tool.clip(item.answer)" class="icon icon-copy" style="color:#666;font-size:0.7rem;padding:0.2rem;border-radius:0.2rem"></i>
							<i class="icon icon-refresh" style="color:#666;font-size:0.65rem;padding:0.2rem;border-radius:0.2rem"></i>
							<i class="icon icon-fenxiang2" style="color:#666;font-size:0.7rem;padding:0.2rem;border-radius:0.2rem"></i>
						</div>
						<div class="fui-cellone-remark noremark">
							<div ng-if="item.uptime" class="gray" style="color: #ccc;font-size:0.6rem;padding-top:0.2rem">{{item.uptime}}</div>
						</div>
						</div>
			</div>
			</div>
			<div ng-include="sys_html('_listnew')"></div>
	</div>
</div>
<script>
scope.pagedata.is_backpage=false
var curtype='text';
//滚动加载
scope.scroll(function(){
	setTimeout('getlist()',500);
},true,'svposttext');
function followewm(textimg){
	scope.pagedata.textimg = textimg;
	scope.$evalAsync();
	$('#followewm').modal();
}
var images = {
	localIds: [],
};
var voice = {
	localId: '',
	serverId: ''
};
scope.loading = true;  //状态标记
getlist(1);
$('#svposttext').animate({scrollTop:100000},300);
function getlist(isnew){
	if(isnew){
		scope.tool.get_list('jy_agentmcp/chat/list/',true);
	}else{
		scope.tool.get_list('jy_agentmcp/chat/list/');
	}
}
scope.pagedata.getmsgkey=0;
scope.pagedata.getmsg={};
</script>